< previous page page_456 next page >

Page 456
LISTING 20.3. PRINTING A REPORT. THE REPORTING AND PRINTING AND THE GRAPHICAL USER INTERFACE SUBSYSTEMS COMMUNICATE TO CARRY OUT THE PRINTING.

9f8044bafea36a1f728739c0bb58ef4c.gif
 1: 'In the form controller
 2: Public Sub clickedPrintReport()
 3:     Screen.MousePointer = vbHourglass
 4:     If TypeName(theReporting) <> Nothing Then
 5:         'Set thePrinterProxy = New PrinterProxy
 6:         theReporting.printReport 1
 7:     End If
 8:     Screen.MousePointer = vbDefault
 9: End Sub
10:
11: 'In RochTextReporting
12: Private Function IReporting_printReport(ParamArray argSettings()) As
     Variant
13:    thePrinterProxy.printReport theRichTextBox,
        eReporting.RichTextReporting 'Print to actual Printer
14: End Function
15: 'In PrinterProxy
16: Public Sub printReport(ParamArray argObject())
17: 'argObject(0) = Object
18: 'argObject(1) = Message
19: If Not IsMissing(argObject(0)) Then
20:     Select Case argObject(1)
21:         Case eReporting.AccessReporting
22:         Case eReporting.CrystalReporting
23:         Case eReporting.RichTextReporting
24:             argObject(0).SelPrint Printer.hDC 'Physical printing done now
25:     End Select
26: End If
27: End Sub

Interfacing Between the Workgroup and User Security Subsystem and the Database Access and Internal Application Manager Subsystems
Perhaps the most complex part of creating commercial and corporate applications is determining whether the user is supposed to use the application (know as authorization). In addition, you have to verify exactly what roles the user can perform and assign role controller classes to keep track of all the various roles the user can play (know as authentication). Authorization and authentication involve the sometimes complex communication between the Workgroup and User Security, Database Access, and Internal Application Manager subsystems. Listing 20.4 shows the sequence of interactions between these subsystems, from the initialization of the application to the completed authorization and authentication.

 
< previous page page_456 next page >

If you like this book, buy it!